Skip to content

Add neo-tui console UI with plugin load and live show state - #1099

Open
cschuchardt88 wants to merge 12 commits into
neo-project:master-n3from
cschuchardt88:feature/console-ui
Open

Add neo-tui console UI with plugin load and live show state#1099
cschuchardt88 wants to merge 12 commits into
neo-project:master-n3from
cschuchardt88:feature/console-ui

Conversation

@cschuchardt88

@cschuchardt88 cschuchardt88 commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

neo-tui (src/Neo.ConsoleUI) is a cross-platform console UI for neo-cli (Windows, Linux, macOS). It is meant to replace neo-gui, the Windows-only desktop app: same node (MainService), same plugins, same commands, without WinForms.

It starts the same MainService node, loads plugins the same way, and then shows a live show state dashboard instead of a line prompt.

Docs and screenshots: docs/neo-tui/README.md

dotnet run --project src/Neo.ConsoleUI

Startup flags match neo-cli: --config/-c, --wallet/-w, --password/-p, --db-engine, --db-path, --plugins, --noverify.

Live status

The home screen is neo-cli show state, refreshed in place: blockchain, memory/CPU, mempool, network, sync bar, wallet, and loaded plugins.

CONNECTED PEERS comes from LocalNode.GetRemoteNodes() (address, height, user agent). The title sits on the time/uptime row; the table lines up with BLOCKCHAIN STATUS. Five rows are visible; extra peers scroll with Up/Down (also J/K, PgUp/PgDn, Home/End).

Key Action
M / Enter Command menu
C Command line (same neo> prompt as neo-cli)
H Help
Up / Down Scroll peers
Q / Esc Quit

Wide status

Peers scrolled

Narrow status

Menus and command output

Command menu

Plugin commands

Please wait

Output stays on this console:

  1. Spinner: Please wait — running … until the command finishes
  2. Bordered popup with captured stdout
  3. Rerun command or Close

plugins output

log block 1

Command parameters

Command line (C) — same neo> prompt as neo-cli:

Command line

Plugin loading (same path as neo-cli)

  • Working directory is AppContext.BaseDirectory (Plugins/, config.json, auto-install zips).
  • Waits for MainService.WhenStarted before building the command catalog, then scans Plugin.Plugins for [ConsoleCommand].
  • --plugins is forwarded to neo-cli.
  • Build copies every node plugin to bin/$(Configuration)/$(TargetFramework)/Plugins/<Name>/ (created if missing), plus extra dependency dlls and RID natives (libleveldb.dll, …) next to the exe. Same copy for neo-cli and neo-tui (src/NodePlugins.props, src/CopyNodePlugins.targets).

Implementation notes

  • MainService.WhenStarted completes after StartCore so the TUI does not race plugin registration.
  • CreateBroadcastTask / GetMaxPeerBlockHeight are internal (InternalsVisibleTo neo-tui).
  • README and screenshots live in docs/neo-tui/.

System.CommandLine exposes every ConsoleCommand. Spectre.Console
provides category menus, a command palette, and a line editor with
history, Tab complete, and hotkeys. Hosts MainService so behavior
matches neo-cli. No PR; local test build.
RootCommand had no action, so System.CommandLine printed
Required command was not provided. Default to the interactive UI
and load config.json next to the executable when cwd has none.
Copy plugins next to the exe, register plugin commands after start,
and open on a show-state dashboard with connected peers. Command
output is a popup with wait spinner and rerun.
@github-actions github-actions Bot added the N3 label Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.50000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.47%. Comparing base (e56bcce) to head (3a6b97c).

Files with missing lines Patch % Lines
src/Neo.CLI/CLI/MainService.cs 37.50% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           master-n3    #1099      +/-   ##
=============================================
- Coverage      51.48%   51.47%   -0.02%     
=============================================
  Files            284      284              
  Lines          16699    16715      +16     
  Branches        2148     2149       +1     
=============================================
+ Hits            8598     8604       +6     
- Misses          7527     7536       +9     
- Partials         574      575       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shargon

shargon commented Aug 31, 2026

Copy link
Copy Markdown
Member

I like it, @superboyiii could you test it please?

@shargon
shargon requested a review from superboyiii August 31, 2026 09:24
@superboyiii

Copy link
Copy Markdown
Member

I like it, @superboyiii could you test it please?

Sure

Comment thread src/Neo.CLI/CLI/MainService.cs Outdated
@superboyiii

Copy link
Copy Markdown
Member

Another changes are good. Tested.

shargon and others added 2 commits September 2, 2026 15:42
Co-authored-by: Owen <38493437+superboyiii@users.noreply.github.com>
@ajara87

ajara87 commented Sep 8, 2026

Copy link
Copy Markdown
Member

@shargon merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants